<template>
  <AuditShowPage
    labelWidth="250px"
    :formData="formData"
    :formItems="formItems"
  >
    <h3 slot="page-header">品牌审核未通过-查看</h3>
    <SeriesEditor slot="seriesList" :dataSource="formData.seriesList" :tableColumns="seriesColumns" :canAdd="false" />
  </AuditShowPage>
</template>
<script>
import AuditShowPage from '@/components/AuditShowPage';
import SeriesEditor from '../components/SeriesEditor';
import { FORM_ITEMS } from './constants';
import { getBrandAuditInfoService } from '@/api/basics/brandManage/brandToAudit';
export default {
  components: {
    AuditShowPage,
    SeriesEditor
  },
  data () {
    return {
      formData: {},
      formItems: FORM_ITEMS,
      seriesColumns: [
        { title: '系列ID', key: 'seriesUuid' },
        {
          title: '系列名称',
          children: [
            { title: '原值', key: 'seriesOriginalValue' },
            { title: '现值', key: 'series' }
          ]
        },
        {
          title: '是否启用',
          children: [
            { title: '原值', key: 'seriesStateStrOriginalValue' },
            { title: '现值', key: 'seriesStateStr' }
          ]
        }
      ]
    }
  },
  mounted () {
    this.getPageDetails(this.$route.query?.uuid)
  },
  methods: {
    async getPageDetails (uuid) {
      const data = { uuid }
      const res = await getBrandAuditInfoService(data, '.page-body')
      if (res?.retData) {
        this.formData = res.retData
      }
    },
  }
}
</script>
